
	<h1>Dashboard</h1>
	<div class="span-14">
		<div class="ovw_notice">
		<h2>Notice Board</h2>
		<ul><%@notice_boards.each do |notice_board|%>
			<li class="<%= cycle "odd", "even" %>"><strong><%=notice_board.created_at.strftime("[%d/%m/%Y]")%> <%=notice_board.title%></strong><br />
				<%= link_to simple_format(truncate(notice_board.description,110)),:action => 'read_notice_board', :id => notice_board.id%></li><%end%>
			<li></li>
		</ul>
		</div>
		
		<div class="ovw_leave">
			<h2>My  Monthly Attendance</h2>
				<p class="cal_date">October 2010</p>
				<table>
					<tr>
						<td><table class="cal">
		<% i = 1 %><%1.upto(@cicaks) do |c|%><% i += 1 %>
		<% if i == 1 %><tr>
		<% elsif i < 9 %><th>
		<%a = Date.new(Time.now.year,Time.now.month,c)%><%=a.strftime("%a").to_s %></th>
		<% end %><% end %></tr>
		
  <% i = 1;%><%1.upto(@cicaks) do |c|%>
  <% if (i == 1) %><tr><% else if (i > 7) %><% i = 1%></tr><tr>
    <% end %><% end %>
    <% i+=1 %><td><%@a = Date.new(Time.now.year,Time.now.month,c)%><%@checkdate = LeaveDetail.find(:first,:conditions => ["employee_id = ? and date = ?",session[:employee_id],@a])%>
	<%if !@checkdate.nil?%><%if @checkdate.leave.leave_type_id == 1%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "ul" %>
	 <%elsif @checkdate.leave.leave_type_id == 2%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "fd" %>
	<%elsif @checkdate.leave.leave_type_id == 3%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "mdl" %>
	<%elsif @checkdate.leave.leave_type_id == 4%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "mtl" %>
		<%elsif @checkdate.leave.leave_type_id == 5%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "ptl" %>
	<%elsif @checkdate.leave.leave_type_id == 6%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "mrl" %>
	<%elsif @checkdate.leave.leave_type_id == 6%>
	<%= link_to @a.strftime("%t").to_s+c.to_s, {:action => "my_leave_information"}, :class => "cl" %>
	<%end%>
	<%else%><%= link_to @a.strftime("%t").to_s+c.to_s %><%end%></td>
		<% end %>
		</tr>
</table></td>
						<td><img src="/images/cal_info1.png" width="266" height="119" /></td>
					</tr>
				</table>
		</div>
	</div>
	<div class="span-10 last">
		<div class="ovw_visitor">
			<h2>Visitor Info</h2>
			<table>
			<%@visitors.each do |visitor|%>
				<tr>
					<th width="10%">Date</th>
					<th>From</th>
				</tr>
				<tr>
					<td><%=visitor.check_in.strftime("%d.%b.%Y")%></td>
					<td><%=visitor.name%> from <%=visitor.organization%></td>
				</tr>
				<%end%>
			</table>
		</div>
		
		<div class="ovw_meeting">
			<h2>Meeting Room  Info</h2>
			<table>
				<tr>
					<th width="26%">Room</th>
					<th width="25%">Time</th>
					<th width="49%">Description</th>
				</tr>
				<%@meetings.each do |meeting|%>
				<tr>
					<td><%=meeting.meeting_room.name%></td>
					<td><%=meeting.booking_time.hour%>-<%=meeting.booking_time.hour+ meeting.duration.to_i%></td>
					<td><%=meeting.brief_desc%></td>
				</tr>
			<%end%>
			</table>
		</div>
		
	</div>
